// 引入createStore，专门用于创建redux中最为核心的store对象,applyMiddleware执行中间间
import {createStore,applyMiddleware,combineReducers} from 'redux'
// 引入为count组件服务的reducer
import countReducer from './reducers/count'
import personReducer from './reducers/person'
//引入redux-thunk 用于支持异步action
import thunk from 'redux-thunk'

// 合并所有reducer,汇总
const allReducer = combineReducers({
    he:countReducer,
    allPerson:personReducer
})
// 暴露store
export default createStore(allReducer,applyMiddleware(thunk))